home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1998 #1 / Amiga Plus 1998 #1.iso / demo-versionen / haage&partner / warpup-warpos / source / tools / changemmu.p next >
Text File  |  1997-09-24  |  2KB  |  79 lines

  1.                 incdir  include:
  2.                 incdir  lvo:
  3.  
  4. **      '(C) Copyright 1997 Haage & Partner Computer GmbH'
  5. **           All Rights Reserved
  6.  
  7.                 include powerpc/ppcmacros.i
  8.                 include powerpc/powerpc.i
  9.                 include powerpc/tasksppc.i
  10.  
  11.                 include powerpc_lib.i
  12.                 include exec_lib.i
  13.                 include dos_lib.i
  14.  
  15.                 xref    _SysBase
  16.                 xref    _DOSBase
  17.                 xref    _PowerPCBase
  18.                 xref    _LinkerDB
  19.                 smalldata
  20.                 executable
  21.                 escapestr
  22.                 version 10
  23.  
  24. start
  25.                 prolog  1024
  26.                 push    r31
  27.                 la      _d1,template
  28.                 la      _d2,Array
  29.                 li      _d3,0
  30.                 RUN68K_XL       _DOSBase,ReadArgs
  31.                 tstw    _d0
  32.                 beq     .close
  33.                 mr      r31,_d0
  34.                 la      r3,Array
  35.                 lwz     r4,0(r3)
  36.                 tstw    r4
  37.                 bne     .standard
  38.                 lwz     r4,4(r3)
  39.                 tstw    r4
  40.                 bne     .bat
  41.                 li      r4,0
  42.                 CALLPOWERPC     FindTaskPPC
  43.                 lwz     r3,TASKPPC_FLAGS(r3)
  44.                 bittst  r3,TASKPPCP_BAT
  45.                 bne     .showBAT
  46.                 la      _d1,showpaged
  47.                 b       .printinfo
  48. .showBAT
  49.                 la      _d1,showBAT
  50. .printinfo
  51.                 la      _d2,Args
  52.                 RUN68K_XL       _DOSBase,VPrintf
  53.                 b       .done
  54. .bat
  55.                 li      r4,CHMMU_BAT
  56.                 CALLPOWERPC     ChangeMMU
  57.                 b       .done
  58. .standard
  59.                 li      r4,CHMMU_STANDARD
  60.                 CALLPOWERPC     ChangeMMU
  61. .done
  62.                 mr      _d1,r31
  63.                 RUN68K_XL       _DOSBase,FreeArgs
  64. .close
  65.                 pop     r31
  66.                 epilog
  67.  
  68.                 section data
  69. template        dc.b    "S=STANDARD/S,B=BAT/S",0
  70. showpaged       dc.b    "This task runs under standard paged MMU setup\n",0
  71. showBAT         dc.b    "This task runs under BAT MMU setup\n",0
  72.  
  73.                 section bss
  74.                 ds.b    32
  75. Array           ds.l    2
  76. Args            ds.l    1
  77.                 ds.b    32
  78.                 even
  79.